diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 8db4f3b..4c881d8 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -1,13 +1,13 @@
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
  * An open source application development framework for PHP 5.1.6 or newer
  *
  * NOTICE OF LICENSE
- * 
+ *
  * Licensed under the Open Software License version 3.0
- * 
+ *
  * This source file is subject to the Open Software License (OSL 3.0) that is
  * bundled with this package in the files license.txt / license.rst.  It is
  * also available through the world wide web at this URL:
@@ -25,8 +25,6 @@
  * @filesource
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * Database Utility Class
  *
@@ -36,22 +34,15 @@
  */
 class CI_DB_utility extends CI_DB_forge {
 
-	var $db;
-	var $data_cache		= array();
+	public $db;
+	public $data_cache		= array();
 
-	/**
-	 * Constructor
-	 *
-	 * Grabs the CI super object instance so we can access it.
-	 *
-	 */
-	function __construct()
+	public function __construct()
 	{
 		// Assign the main database object to $this->db
 		$CI =& get_instance();
 		$this->db =& $CI->db;
-
-		log_message('debug', "Database Utility Class Initialized");
+		log_message('debug', 'Database Utility Class Initialized');
 	}
 
 	// --------------------------------------------------------------------
@@ -59,10 +50,9 @@
 	/**
 	 * List databases
 	 *
-	 * @access	public
 	 * @return	bool
 	 */
-	function list_databases()
+	public function list_databases()
 	{
 		// Is there a cached result?
 		if (isset($this->data_cache['db_names']))
@@ -80,8 +70,7 @@
 			}
 		}
 
-		$this->data_cache['db_names'] = $dbs;
-		return $this->data_cache['db_names'];
+		return $this->data_cache['db_names'] = $dbs;
 	}
 
 	// --------------------------------------------------------------------
@@ -89,11 +78,10 @@
 	/**
 	 * Determine if a particular database exists
 	 *
-	 * @access	public
 	 * @param	string
 	 * @return	boolean
 	 */
-	function database_exists($database_name)
+	public function database_exists($database_name)
 	{
 		// Some databases won't have access to the list_databases() function, so
 		// this is intended to allow them to override with their own functions as
@@ -114,17 +102,17 @@
 	/**
 	 * Optimize Table
 	 *
-	 * @access	public
 	 * @param	string	the table name
 	 * @return	bool
 	 */
-	function optimize_table($table_name)
+	public function optimize_table($table_name)
 	{
 		$sql = $this->_optimize_table($table_name);
 
 		if (is_bool($sql))
 		{
-				show_error('db_must_use_set');
+			show_error('db_must_use_set');
+			return FALSE;
 		}
 
 		$query = $this->db->query($sql);
@@ -140,10 +128,9 @@
 	/**
 	 * Optimize Database
 	 *
-	 * @access	public
 	 * @return	array
 	 */
-	function optimize_database()
+	public function optimize_database()
 	{
 		$result = array();
 		foreach ($this->db->list_tables() as $table_name)
@@ -177,11 +164,10 @@
 	/**
 	 * Repair Table
 	 *
-	 * @access	public
 	 * @param	string	the table name
 	 * @return	bool
 	 */
-	function repair_table($table_name)
+	public function repair_table($table_name)
 	{
 		$sql = $this->_repair_table($table_name);
 
@@ -203,14 +189,13 @@
 	/**
 	 * Generate CSV from a query result object
 	 *
-	 * @access	public
 	 * @param	object	The query result object
 	 * @param	string	The delimiter - comma by default
 	 * @param	string	The newline character - \n by default
 	 * @param	string	The enclosure - double quote by default
 	 * @return	string
 	 */
-	function csv_from_result($query, $delim = ",", $newline = "\n", $enclosure = '"')
+	public function csv_from_result($query, $delim = ',', $newline = "\n", $enclosure = '"')
 	{
 		if ( ! is_object($query) OR ! method_exists($query, 'list_fields'))
 		{
@@ -218,15 +203,13 @@
 		}
 
 		$out = '';
-
 		// First generate the headings from the table column names
 		foreach ($query->list_fields() as $name)
 		{
 			$out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $name).$enclosure.$delim;
 		}
 
-		$out = rtrim($out);
-		$out .= $newline;
+		$out = rtrim($out).$newline;
 
 		// Next blast through the result array and build out the rows
 		foreach ($query->result_array() as $row)
@@ -235,8 +218,7 @@
 			{
 				$out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure.$delim;
 			}
-			$out = rtrim($out);
-			$out .= $newline;
+			$out = rtrim($out).$newline;
 		}
 
 		return $out;
@@ -247,12 +229,11 @@
 	/**
 	 * Generate XML data from a query result object
 	 *
-	 * @access	public
 	 * @param	object	The query result object
 	 * @param	array	Any preferences
 	 * @return	string
 	 */
-	function xml_from_result($query, $params = array())
+	public function xml_from_result($query, $params = array())
 	{
 		if ( ! is_object($query) OR ! method_exists($query, 'list_fields'))
 		{
@@ -280,16 +261,14 @@
 		foreach ($query->result_array() as $row)
 		{
 			$xml .= $tab."<{$element}>".$newline;
-
 			foreach ($row as $key => $val)
 			{
 				$xml .= $tab.$tab."<{$key}>".xml_convert($val)."</{$key}>".$newline;
 			}
 			$xml .= $tab."</{$element}>".$newline;
 		}
-		$xml .= "</$root>".$newline;
 
-		return $xml;
+		return $xml .= "</$root>".$newline;
 	}
 
 	// --------------------------------------------------------------------
@@ -297,10 +276,9 @@
 	/**
 	 * Database Backup
 	 *
-	 * @access	public
 	 * @return	void
 	 */
-	function backup($params = array())
+	public function backup($params = array())
 	{
 		// If the parameters have not been submitted as an
 		// array then we know that it is simply the table
@@ -314,14 +292,14 @@
 
 		// Set up our default preferences
 		$prefs = array(
-							'tables'		=> array(),
-							'ignore'		=> array(),
-							'filename'		=> '',
-							'format'		=> 'gzip', // gzip, zip, txt
-							'add_drop'		=> TRUE,
-							'add_insert'	=> TRUE,
-							'newline'		=> "\n"
-						);
+				'tables'		=> array(),
+				'ignore'		=> array(),
+				'filename'		=> '',
+				'format'		=> 'gzip', // gzip, zip, txt
+				'add_drop'		=> TRUE,
+				'add_insert'		=> TRUE,
+				'newline'		=> "\n"
+			);
 
 		// Did the user submit any preferences? If so set them....
 		if (count($params) > 0)
@@ -335,29 +313,23 @@
 			}
 		}
 
-		// ------------------------------------------------------
-
 		// Are we backing up a complete database or individual tables?
 		// If no table names were submitted we'll fetch the entire table list
-		if (count($prefs['tables']) == 0)
+		if (count($prefs['tables']) === 0)
 		{
 			$prefs['tables'] = $this->db->list_tables();
 		}
 
-		// ------------------------------------------------------
-
 		// Validate the format
 		if ( ! in_array($prefs['format'], array('gzip', 'zip', 'txt'), TRUE))
 		{
 			$prefs['format'] = 'txt';
 		}
 
-		// ------------------------------------------------------
-
-		// Is the encoder supported?  If not, we'll either issue an
+		// Is the encoder supported? If not, we'll either issue an
 		// error or use plain text depending on the debug settings
-		if (($prefs['format'] == 'gzip' AND ! @function_exists('gzencode'))
-		OR ($prefs['format'] == 'zip'  AND ! @function_exists('gzcompress')))
+		if (($prefs['format'] === 'gzip' AND ! @function_exists('gzencode'))
+			OR ($prefs['format'] === 'zip'  AND ! @function_exists('gzcompress')))
 		{
 			if ($this->db->db_debug)
 			{
@@ -367,60 +339,49 @@
 			$prefs['format'] = 'txt';
 		}
 
-		// ------------------------------------------------------
-
-		// Set the filename if not provided - Only needed with Zip files
-		if ($prefs['filename'] == '' AND $prefs['format'] == 'zip')
-		{
-			$prefs['filename'] = (count($prefs['tables']) == 1) ? $prefs['tables'] : $this->db->database;
-			$prefs['filename'] .= '_'.date('Y-m-d_H-i', time());
-		}
-
-		// ------------------------------------------------------
-
-		// Was a Gzip file requested?
-		if ($prefs['format'] == 'gzip')
-		{
-			return gzencode($this->_backup($prefs));
-		}
-
-		// ------------------------------------------------------
-
-		// Was a text file requested?
-		if ($prefs['format'] == 'txt')
-		{
-			return $this->_backup($prefs);
-		}
-
-		// ------------------------------------------------------
-
 		// Was a Zip file requested?
-		if ($prefs['format'] == 'zip')
+		if ($prefs['format'] === 'zip')
 		{
-			// If they included the .zip file extension we'll remove it
-			if (preg_match("|.+?\.zip$|", $prefs['filename']))
+			// Set the filename if not provided (only needed with Zip files)
+			if ($prefs['filename'] == '')
 			{
-				$prefs['filename'] = str_replace('.zip', '', $prefs['filename']);
+				$prefs['filename'] = (count($prefs['tables']) === 1 ? $prefs['tables'] : $this->db->database)
+							.date('Y-m-d_H-i', time()).'.sql';
 			}
-
-			// Tack on the ".sql" file extension if needed
-			if ( ! preg_match("|.+?\.sql$|", $prefs['filename']))
+			else
 			{
-				$prefs['filename'] .= '.sql';
+				// If they included the .zip file extension we'll remove it
+				if (preg_match('|.+?\.zip$|', $prefs['filename']))
+				{
+					$prefs['filename'] = str_replace('.zip', '', $prefs['filename']);
+				}
+
+				// Tack on the ".sql" file extension if needed
+				if ( ! preg_match('|.+?\.sql$|', $prefs['filename']))
+				{
+					$prefs['filename'] .= '.sql';
+				}
 			}
 
 			// Load the Zip class and output it
-
 			$CI =& get_instance();
 			$CI->load->library('zip');
 			$CI->zip->add_data($prefs['filename'], $this->_backup($prefs));
 			return $CI->zip->get_zip();
 		}
+		elseif ($prefs['format'] == 'txt') // Was a text file requested?
+		{
+			return $this->_backup($prefs);
+		}
+		elseif ($prefs['format'] === 'gzip') // Was a Gzip file requested?
+		{
+			return gzencode($this->_backup($prefs));
+		}
 
+		return;
 	}
 
 }
 
-
 /* End of file DB_utility.php */
-/* Location: ./system/database/DB_utility.php */
\ No newline at end of file
+/* Location: ./system/database/DB_utility.php */
